/**
 * <p>Title: Body </p>
 * <p>Description: Represents a body in space</p>
 * @author Guilherme Mauro Germoglio
 */

public class Body {

  //atributes
  private double x_velocity;
  private double y_velocity;
  private double direction;
  private double x;
  private double y;

  //methods

  /**
   * Constructor of Body, which receives a velocity (the body's velocity) and a
   * direction (the angle between an horizontal line and the body's trajetory).
   * @param x The x coordinate
   * @param y The y coordinate
   * @param x_velocity The body's velocity in X axis
   * @param y_velocity The body's velocity in Y axis
   * @param direction The angle between an horizontal line and the body's trajetory
   */

  public Body(int x, int y, double x_velocity, double y_velocity, int direction) {
    this.x = x;
    this.y = y;
    this.x_velocity = x_velocity;
    this.y_velocity = y_velocity;
    this.direction = direction;
  }

  /**
   * Method that returns the X coordinate
   * @return The X coordinate
   */
  public double getX() {
    return x;
  }

  /**
   * Method that returns the Y coordinate
   * @return The Y coordinate
   */
  public double getY() {
    return y;
  }

  /**
   * Method that returns the body's direction
   * @return The body's direction
   */
  public double getDirection() {
    return direction;
  }

  /**
   * Method that returns the body's velocity in X axis
   * @return The body's velocity in X axis
   */
  public double get_X_velocity() {
    return x_velocity;
  }

  /**
   * Method that returns the body's velocity in Y axis
   * @return The body's velocity in Y axis
   */
  public double get_Y_velocity() {
    return y_velocity;
  }

  /**
   * Sets the velocity in X axis
   * @param new_X_velocity The new horizontal velocity
   */
  public void set_X_velocity(double new_X_velocity) {
    this.x_velocity = new_X_velocity;
  }

  /**
   * Sets the velocity in Y axis
   * @param new_Y_velocity The new vertical velocity
   */
  public void set_Y_velocity(double new_Y_velocity) {
    this.y_velocity = new_Y_velocity;
  }

  /**
   * Method which sets the X coordinate
   * @param new_X The new X coordinate
   */
  public void set_X(double new_X) {
    this.x = new_X;
  }
  /**
   * Method which sets the Y coordinate
   * @param new_Y The new Y coordinate
   */
  public void set_Y(double new_Y) {
    this.y = new_Y;
  }

  /**
   * Method which sets the body's direction
   * @param newDirection The new direction
   */
  public void setDirection(double newDirection){
    this.direction = newDirection;
  }
}